home *** CD-ROM | disk | FTP | other *** search
- /* matherr.c from page 227 */
- /* Use /NOE option with linker to use our copy of
- * matherr error handler without complaining
- */
-
- #include <stdio.h>
- #include <math.h>
- #include <string.h>
- main(int argc, char **argv)
- {
- double result;
- if(argc < 2)
-
- printf("Usage: %s <value>\n", argv[0]);
-
- else
- {
- result = sqrt(atof(argv[1]));
- printf("sqrt (%s) = %f\n", argv[1], result);
- }
- }
-
-